package com.dianban.service.impl;

import com.dianban.dao.JwUserAccountDao;
import com.dianban.entity.JwUserAccount;
import com.dianban.service.JwUserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true)
public class JwUserAccountServiceImpl implements JwUserAccountService {

    @Autowired
    private JwUserAccountDao jwUserAccountDao;

    @Override
    public List<JwUserAccount> find(Long userId, String status) {
        return jwUserAccountDao.find(userId, status);
    }

    @Override
    @Transactional(readOnly = false)
    public void insert(JwUserAccount jwUserAccount) {
        jwUserAccountDao.insert(jwUserAccount);
    }

    @Override
    @Transactional(readOnly = false)
    public void updateFaceImage(Long id, String faceImage) {
        jwUserAccountDao.updateFaceImage(id, faceImage);
    }
}
